<template>
  <div class="luckyBagRain">
    <div class="frame">
     <!-- <img class="frameRule" @click="isRule" src="../../../../static/rule.png" alt="" /> -->
  <!--   <img class="frameRule frameCard" @click="myCard" src="../../../../static/jilu.png" alt="" />
     <img class="frameRule2 frameCard" @click="updatePhoneShow = true" src="../../../../static/bind.png" alt="" /> -->
    </div>
    <div class="card"></div>
    <div class="content">
      <div class="text">
        {{activity.brief}}
      </div>
    </div>
    <div class="button">分享邀约{{gorup.number}}人({{gorup.memberInfoList.length}}/{{gorup.number}})</div>

    <!-- <activityRule :show="ruleShow" :title="mallActivityEntity.strategy" @isRule="isRule"></activityRule> -->
    <!-- <redChangePhone v-if="updatePhoneShow" @phoneCancel="phoneCancel" :titles="titles"></redChangePhone> -->
  </div>
</template>

<script>
  // 请求接口
  import {
    groupBuyDetail,
    activityDetail
  } from '@/api/raffle.js'
  import redChangePhone from '@/components/redChangePhone'
  import activityRule from '@/components/activityRule'
  import {
    Dialog
  } from 'vant'
  import {
    setStore,
    getStore,
    removeStore
  } from '@/utils/storage'
  import {
    baseApi,
    wechatAuthUrlTail,
    preLoginUrl
  } from '@/config'
  import axios from 'axios'
  export default {
    components: {
      redChangePhone,
      activityRule
    },
    data() {
      return {
        id:'',
        activity:{},
        gorup:{}
      }
    },
    mounted() {
      this.id = this.$route.query.id
      this.groupBuyDetail()


    },
    methods: {
      // 拼团信息
      activityDetail(activityId) {
        let data = {
          id: activityId
        }
        activityDetail(data).then(res=>{
          console.log(res.data)
          this.activity = res.data
        })
      },
      //活动信息
      groupBuyDetail() {
        let data = {
          id: this.id
        }
        groupBuyDetail(data).then(res=>{
          console.log(data)
          this.gorup = res.data
          this.activityDetail(res.data.activityId)
        })
      },


      // 提示
      dialog(message, url) {
        Dialog.alert({
          message: message,
        }).then(() => {
          // on close
          if (url) {

          }
        });
      },
      showToast(msg) {
        this.$toast({
          message: msg,
          position: 'center',
          duration: 2500
        })
      },
    }
  }
</script>

<style lang="scss" scoped>
  .luckyBagRain {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: url('../../../../static/game/groupBuying/bj3.png') no-repeat;
    background-size: 100% 100%;
    position: relative;
    overflow: hidden;
  }
  .card{
    width: 375px;
    height: 40px;
    background: url('../../../../static/game/groupBuying/buycard.png') no-repeat;
    background-size: 100% 100%;
    margin: 371px auto 0;
  }
  .content{
    width: 343px;
    height: 207px;
    background: url('../../../../static/game/groupBuying/nr.png') no-repeat;
    background-size: 100% 100%;
    margin: 15px auto 0;
    overflow: hidden;
  }
  .text{
    width: 319px;
    height: 99px;
    font-weight: 500;
    font-size: 15px;
    color: #FFFFFF;
    margin: 78px auto 0;
  }
  .button{
    width: 234px;
    height: 42px;
    background: url('../../../../static/game/groupBuying/jx.png') no-repeat;
    background-size: 100% 100%;
    text-align: center;
    line-height: 42px;
    font-weight: 500;
    font-size: 20px;
    color: #FFFFFF;
    margin: 20px auto 0;
  }
  .frameCard {
    margin-top: 10px;
  }

  .frameRule {
    color: #fff;
    border-radius: 12px 0 0 12px;
    box-sizing: border-box;
    display: block;
  }
  .frameRule2{
    display: block;
    color: #fff;
    border-radius: 12px 0 0 12px;
    box-sizing: border-box;
  }

  .frame {
    position: absolute;
    top: 20px;
    right: 0;
  }
  .number {
    font-size: 28px;
    color: #fff;
    margin-left: 30px;
    margin-top: 30px;
  }
  .popup{
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, .4);
    position: fixed;
    top: 0;
    left: 0;
    overflow: hidden;
  }
  .popup img{
    width: 285px;
    height: 325px;
    display: block;
    margin: 187px auto 0;
  }
  .times{
    color: #fff;
    font-size: 16px;
    text-align: center;
    width: 100%;
  }
</style>
